package com.jiyun.controller;

import com.jiyun.pojo.Msg;
import com.jiyun.pojo.User;
import com.jiyun.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @Autowired
    UserService userService;


    @RequestMapping("sendMsg")
    public String sendMsg(@RequestBody Msg msg){
        return userService.sendMsg(msg);
    }

    @RequestMapping("findMsg")
    public String findMsg(@RequestBody User user){
        return userService.findMsg(user);
    }

}
